//
//  SectionHeaderView.m
//  LiveSoftware
//
//  Created by lanou3g on 15/7/14.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "SectionHeaderView.h"

@implementation SectionHeaderView

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.headerBg = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, frame.size.height)];
        self.headerBg.image = [UIImage imageNamed:@"header_view_bg"];
        [self addSubview:_headerBg];
        
        self.headerImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenIp6(160), frame.size.height)];
        self.headerImage.image = [UIImage imageNamed:@"data_title_green"];
        
        self.headerLabel = [[UILabel alloc] initWithFrame:CGRectMake(kScreenIp6(20), 0, kScreenIp6(160) - kScreenIp6(40), frame.size.height)];
        self.headerLabel.font = [UIFont systemFontOfSize:13];
        self.headerLabel.adjustsFontSizeToFitWidth = YES;
        self.headerLabel.textColor = [UIColor whiteColor];
        
        [self.headerImage addSubview:_headerLabel];
        [self addSubview:_headerImage];
        
    }
    return self;
}

@end
